cc.Class({
    extends: cc.Component,

    properties: {
        bgNode: cc.Node
    },

    onLoad() {
        this.bgNode.opacity = 120;
        this.node.on("touchstart", function () {
            this.bgNode.opacity = 255;
        }, this);

        this.node.on("touchend", function () {
            this.bgNode.opacity = 120;
        }, this);

        this.node.on("touchcancel", function () {
            this.bgNode.opacity = 120;
        }, this);
    }
});
